function clsbox() {
    hdaper();
}

function shaper() {
    $(".hdaper .panel").addClass('tpshow');
    $('.paper-bg').show();
}

function hdaper() {
    $(".hdaper .panel").removeClass('tpshow');
    $('.paper-bg').hide();
}
$CertusFormAjax.ajax("findProNodes",{"processId":processId},function (response) {
    var data = response.data;
    var html="";
    var dlength = data.length;
    var isFinish=false;
    for(var i=0;i<dlength;i++){
        var nodeStr="";
        html+='<div class="proce-log"><div class="proce-log-lf"><div class="log-dashed"></div>' +
            '</div><div class="proce-log-rg"><div class="log-mark">';
        if (data[i].nodeFlag==1){
            html+='<div class="log-mark-icon mark-prime">发起';
            nodeStr+='&nbsp;&nbsp;&nbsp;&nbsp;出差申请';
        }else if (data[i].nodeFlag==2){
            html+='<div class="log-mark-icon mark-danger">拒绝';
            nodeStr+='&nbsp;&nbsp;&nbsp;&nbsp;申请不通过';
            isFinish = true;
        }else if (data[i].nodeFlag == 3){
            html+='<div class="log-mark-icon mark-warning">退回';
            nodeStr+='&nbsp;&nbsp;&nbsp;&nbsp;申请退回';
        }else if (data[i].nodeFlag == 4){
            html+='<div class="log-mark-icon mark-icon">结束';
            nodeStr+='&nbsp;&nbsp;&nbsp;&nbsp;审批通过';
            isFinish = true
        }else if (data[i].nodeFlag == 5){
            html+='<div class="log-mark-icon mark-danger">取消';
            nodeStr+='&nbsp;&nbsp;&nbsp;&nbsp;取消申请';
            isFinish = true
        }else if (data[i].nodeFlag == 6){
            html+='<div class="log-mark-icon mark-prime">提交';
            nodeStr+='&nbsp;&nbsp;&nbsp;&nbsp;提交出差结果';
        }else if (data[i].nodeFlag == 0){
            html+='<div class="log-mark-icon mark-prime">同意';
            nodeStr+='&nbsp;&nbsp;&nbsp;&nbsp;审批通过';
        }else{
            html+='<div class="log-mark-icon mark-icon">结束';
            nodeStr+='&nbsp;&nbsp;&nbsp;&nbsp;审批通过';
            isFinish = true
        }
        html+='</div><div class="log-tag"></div><div class="log-mark-value"><div class="log-mtitle">' +
            '<span class="log-time">'+data[i].createTime;
        html+=nodeStr;
        html+='</span><span class="log-status">状态：';

        if (data[i].nodeFlag==7||data[i].nodeFlag==5||data[i].nodeFlag==8||data[i].nodeFlag==2
            ||data[i].nodeFlag==4){
            //流程走完正常结束
            html+='流程结束<i class="status-red">';
        }else{
            html+='任务执行完毕<i>';
        }

        html+='</i></span></div><div class="log-mbody"><span class="log-name">办理人：';
        html+=data[i].createUser;
        html += '</span><span class="tp-txt">审批意见：';
        html += data[i].opinionMsg;
        html+='</span></div></div></div></div></div>';
    }
    //如果没有正常结束
    if (isFinish==false){
        html+='<div class="proce-log"><div class="proce-log-lf"><div class="log-dashed"></div>' +
            '</div><div class="proce-log-rg"><div class="log-mark">';
        html+='<div class="log-mark-icon mark-blue">待办';
        html+='</div><div class="log-tag"></div><div class="log-mark-value"><div class="log-mtitle">' +
            '<span class="log-time">'+data[dlength-1].createTime;
        html+='&nbsp;&nbsp;&nbsp;&nbsp;等待办理';
        html+='</span><span class="log-status">状态：';
        html+='流程执行中<i class="status-purple">';

        html+='</i></span></div><div class="log-mbody"><span class="log-name">办理人：';
        html+=data[dlength-1].delUser;
        html += '</span>';
        html+='</div></div></div></div></div>';
    }
    $("#nodeContiner").html(html);

})